<template>
  编程式导航ProgramaticallyNavigation
  <hr>
  <button @click="$router.push('/users/eduardo')">jump1</button><br>
  <button @click="$router.push({ path: '/users/eduardo' })">jump2</button><br>
  <button @click="$router.push({ name: 'user', params: { id: 'eduardo' } })">jump3</button><br>
  <button @click="$router.push({ path: '/register', query: { plan: 'private' } })">jump4</button><br>
  <button @click="$router.push({ path: '/about', hash: '#team' })">jump5</button><br>
  <hr>
  <button @click="$router.push({ path: '/about', replace: true })">jump6</button><br>
  <hr>
  <button @click="$router.go(1)">go1</button><br>
  <button @click="$router.go(-1)">go-1</button><br>

</template>

<script>
/* 
// 字符串路径
router.push('/users/eduardo')

// 带有路径的对象
router.push({ path: '/users/eduardo' })

// 命名的路由，并加上参数，让路由建立 url
router.push({ name: 'user', params: { id: 'eduardo' } })

// 带查询参数，结果是 /register?plan=private
router.push({ path: '/register', query: { plan: 'private' } })

// 带 hash，结果是 /about#team
router.push({ path: '/about', hash: '#team' })
*/
export default {

}
</script>

<style>

</style>